package com.after.saas.common.model.query;


import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * @Classname CommonQuery
 * @Description TODO
 * @Date 2021/5/12 13:48
 * @Created by hjchen
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "公共查询对象", description = "公共搜索条件")
public class CommonQuery extends BaseQueryParam {

    private Long id;
    private Integer page = 1;
    private Integer size = 20;
    private String account;
    private String dictType;
    private String mouldCode;
    private String date;
    private String startTime;
    private String endTime;

    private List<String> orderCodes;
    private List<String> protoCodes;

    public void setDate(String date) {
        this.date = date;
        if (StringUtils.isNotEmpty(date)) {
            startTime = date;
            endTime = date;
        }
    }
}